package com.nineclock.document;

import com.nineclock.common.entity.Result;
import com.nineclock.document.dto.DocFileDto;
import com.nineclock.document.dto.DocFolderDto;
import com.nineclock.document.dto.DocumentDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.checkerframework.checker.units.qual.A;

import java.io.UnsupportedEncodingException;


@Api(value = "APP文件管理接口", tags = "文档服务", description = "文档管理")
public interface AppDocumentControllerApi {

    @ApiOperation(value = "查询当前目录下的文件夹及文件")
    public Result<DocumentDto> queryFolderAndFile(Long parentFolderId);


    @ApiOperation(value = "创建文件夹")
    public Result insertFolder(DocFolderDto docFolderDto); //增加该接口方法

    @ApiOperation(value = "新增文件")
    public Result insertFile(DocFileDto docFileDto) ;

    @ApiOperation(value = "根据文档ID查询文档详情")
    public Result<DocFileDto> getFileByFileId(Long fileId);

    @ApiOperation(value = "根据ID更新文档内容")
    public Result updateFile(DocFileDto docFileDto) throws UnsupportedEncodingException;

    @ApiOperation(value = "pc端展示")
    public Result<DocumentDto> pagingFile(Integer page, Integer pageSize, String keyword);
}